package com.tanhan.mindapp.dao;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tanhan.mindapp.dao.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@TableName("sys_dept")
@Schema(description = "系统部门实体类")
public class SysDept extends BaseEntity {
    private static final long serialVersionUID = 1L;

    // 部门名称
    @TableField("dept_name")
    @Schema(description = "部门名称", example = "研发部")
    private String deptName;

    // 父部门ID
    @TableField("parent_id")
    @Schema(description = "父部门ID", example = "0")
    private Long parentId;

    // 祖级列表
    @TableField("ancestors")
    @Schema(description = "祖级列表", example = "0,1,2")
    private String ancestors;

    // 显示顺序
    @TableField("order_num")
    @Schema(description = "显示顺序", example = "1")
    private Integer orderNum;

    // 负责人
    @TableField("leader")
    @Schema(description = "负责人", example = "张三")
    private String leader;

    // 联系电话
    @TableField("phone")
    @Schema(description = "联系电话", example = "13800138000")
    private String phone;

    // 邮箱
    @TableField("email")
    @Schema(description = "邮箱", example = "zhangsan@example.com")
    private String email;

    // 部门状态（0正常 1停用）
    @TableField("status")
    @Schema(description = "部门状态", example = "0", allowableValues = {"0", "1"})
    private String status;
}
